import Vue from 'vue'
import vuex from 'vuex'

Vue.use(vuex);

const files = require.context('./modules', false, /\.js$/)
const modules = {}
files.keys().forEach(key => {
  modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default
})
// import common from './modules/common'
// import base from './modules/base'


export default new vuex.Store({
  namespaced: true,
  modules
})
